<% if deploy.waiting_for_buddy? && webhooks = deploy.stage.slack_webhooks.select { |w| w.deliver_for?(:buddy_box, deploy) }.presence %>
  <%= render 'shared/notify_buddy_box',
    deploy: deploy, project: project,
    id_prefix: 'slack',
    form_path: Rails.application.routes.url_helpers.slack_webhooks_notify_path(deploy.id),
    title: 'Request a buddy via Slack',
    message: SlackWebhookNotification.new(deploy, webhooks).default_buddy_request_message,
    channels: webhooks.map(&:channel).join(', '),
    users: SamsonSlackWebhooks::SlackWebhooksService.new.users,
    channel_type: 'channels'
  %>
<% end %>
